<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>欢迎使用老成FMS (5.0正式版)-java web框架</title>
		<meta name="keywords" content="java快速开发框架,java编程,java web"> 
	    <meta name="description" content="老成fms(Frame Management System)，是一款前端，后台，业务集成的快速开发框架">	
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<link rel="stylesheet" href="statics/ace/css/bootstrap.min.css" />
		<link rel="stylesheet" href="statics/ace/css/font-awesome.min.css"/>	
		<link rel="stylesheet" href="statics/ace/css/fonts.googleapis.com.css" />
		<link rel="stylesheet" href="statics/ace/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
		<!--[if lte IE 9]>
			<link rel="stylesheet" href="statics/ace/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="statics/ace/css/ace-skins.min.css" />
		<link rel="stylesheet" href="statics/ace/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="statics/ace/css/jquery.gritter.min.css"/>
		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="statics/ace/css/ace-ie.min.css" />
		<![endif]-->		
		<!--[if !IE]> -->
		<script src="statics/ace/js/jquery-2.1.4.min.js"></script>
		<!-- <![endif]-->	
		<!--[if IE]>
		<script src="statics/ace/js/jquery-1.11.3.min.js"></script>
		<![endif]-->	
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='statics/ace/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>	
		<script src="statics/ace/js/bootstrap.min.js"></script>
		<script src="statics/ace/js/ace-elements.min.js"></script>
		<script src="statics/ace/js/ace.min.js"></script>
		<script src="statics/ace/js/ace-extra.min.js"></script>
		<!--[if lte IE 8]>
		<script src="statics/ace/js/html5shiv.min.js"></script>
		<script src="statics/ace/js/respond.min.js"></script>
		<![endif]-->	
		<script src="statics/ace/js/jquery.gritter.min.js"></script>
	</head>
	<body class="login-layout">
		<div class="main-container" style="margin-top:8%">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container">
							<div class="center">
								<h1>
									<i class="fa fa-leaf green"></i>
									<span class="red">老成FMS登录入口</span>
								</h1>
							</div>
							<div class="space-6"></div>
							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header blue lighter bigger">
												<i class="fa fa-coffee green"></i>
												请输入您的登录信息
											</h4>
											<div class="space-6"></div>											
											
											<form name="loginForm">
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" name="aname" placeholder="用户名" />
															<i class="ace-icon fa fa-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" name="password" placeholder="密码" />
															<i class="ace-icon fa fa-lock"></i>
														</span>
													</label>
													<div class="space"></div>
													<div class="clearfix">
														<label class="inline">
															<input type="checkbox" class="ace" />
															<span class="lbl"> 记住我</span>
														</label>
														<button type="button" class="width-35 pull-right btn btn-sm btn-primary" id="gritter-error">
															<i class="fa fa-key"></i>
															登录
														</button>
													</div>
													<div class="space-4"></div>
												</fieldset>
											</form>											
										</div><!-- /widget-main -->
									</div><!-- /widget-body -->
								</div><!-- /login-box -->
							</div><!-- /position-relative -->
						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div>
		</div><!-- /.main-container -->
		<script type="text/javascript">
			function show_box(id) {
			 jQuery('.widget-box.visible').removeClass('visible');
			 jQuery('#'+id).addClass('visible');
			}	
			jQuery(document).ready(function(){
				$('#gritter-error').on(ace.click_event, function(){
					jQuery.ajax({
				        url: "admin/user/login",
				        dataType: 'json',
				        type:'post',
				        data:{
				        	aname:document.loginForm.aname.value,
				        	password:document.loginForm.password.value,
				        },
				        success: function (res) {
				           if(res==1){
				        	  location.href="admin";
				           }else{
			        	  	   $.gritter.add({
								title: '温馨提示：',
								text: '用户名或密码错误！<img src="http://rescdn.qqmail.com/zh_CN/images/mo/DEFAULT2/9.gif"/>',
								class_name: 'gritter-error  gritter-light',
							  }); 
				           }
				        }
				    });					
					return false;
				});
			});
		</script>
	</body>
</html>
